package com.zhierxi.hello.thread;

public class MyRunnableTest {
    public static void main(String[] args) {
        MyRunnable r= new MyRunnable();
        Thread t1 = new Thread(r);
        Thread t2 = new Thread(r);
        t1.start();
        t2.start();
        System.out.println("程序结束");
    }

}

class MyRunnable implements Runnable{

    @Override
    public void run() {
        for (int i =0;i<50;i++){
            System.out.println(String.format("Runnable ：%s",i));
        }
    }
}